package org.zachary.creditbusiness.hotel.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.zachary.creditbusiness.hotel.entity.Reservation;

import java.util.List;

public interface ReservationService extends IService<Reservation> {

    /**
     * 获取指定用户的所有预订记录，按下单时间倒序
     */
    List<Reservation> listByUserId(Integer userId);

    /**
     * 订单还款：设置 isPay=1；
     * 如果当前时间不晚于 checkoutDate，则设置 promise=1
     */
    Reservation repayReservation(Integer orderId);


    boolean cancelReservation(Integer orderId);

}